package admin.dao;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import student.dto.PassedSubjectDTO;

public class ProfessorDAO {

	private SqlMapClientTemplate client;
	
	public ProfessorDAO(SqlMapClientTemplate client) {
		this.client = client;
	}
	
	public List selectTeachingSubjectList(String id) throws SQLException {
		return client.queryForList("professor.selectTeachingSubjectList", id);
	}
	
	public List selectStudentBySubjectCode(HashMap map) throws SQLException {
		return client.queryForList("professor.selectStudentBySubjectCode", map);
	}
	
	public List selectRatingCategory() throws SQLException {
		return client.queryForList("professor.selectRatingCategory");
	}
	
	public void updateRatingAndScore(PassedSubjectDTO psdto) throws SQLException {
		client.update("professor.updateRatingAndScore", psdto);
	}
	
	public List selectTakingSubject(HashMap map) throws SQLException {
		return client.queryForList("professor.selectTakingSubject", map);
	}
}
